import React, { Component } from 'react'
import style from "./index.module.css"
import { Carousel } from 'antd';
import { Table, Tag, Space, Button, Popconfirm } from 'antd';

import axios from "axios";

const contentStyle = {
    height: '100%',
    color: '#fff',

    textAlign: 'center',
    // background: 'red',
    autoplay: 'false'
};
export default class index extends Component {

    state = {
        data: []
    }

    async componentDidMount() {
        let res = await axios({
            url: "http://10.35.166.83:7777/indexerjiList"
        })
        let arr = (res.data);

        arr.forEach((item, index) => {
            item.key = index + 1
        });
        this.setState({
            data: arr
        })

        console.log(arr)

    }

    render() {
        return (
            <div className={style.szid}>
                <div className={style.changpin}>
                    <h2>热销品</h2>
                    <Carousel autoplay>
                        <div>
                            <h3 style={contentStyle}>
                                <div className={style.moenyz}>
                                    <div className={style.momeyza}>
                                        <img src={require("../../img/01.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p  >已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/02.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/03.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                            </h3>
                        </div>
                        <div>
                            <h3 style={contentStyle}>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/01.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/02.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/03.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                            </h3>
                        </div>
                        <div>
                            <h3 style={contentStyle}>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/02.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/03.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                                <div className={style.moenyz}>
                                    <div className={style.momeyz}>
                                        <img src={require("../../img/01.png").default} alt="标签" />
                                    </div>
                                    <div className={style.momeyx}>
                                        <p>已售产品</p>
                                        <h4>4589万</h4>
                                    </div>
                                </div>
                            </h3>
                        </div>
                    </Carousel>
                </div>
                <div className={style.xaingmu}>
                    <h3>有史以来最好的项目</h3>
                    <div className={style.xaingmmm}>
                        <div className={style.xaingtu}>
                            <img src={require("../../img/01.png").default} alt="标签" />
                        </div>
                        <div className={style.xmmianshu}>
                            <p>已售产品</p>
                            <h4 data={this.state.data}></h4>
                            <h4 dataSource={this.state.data}></h4>
                        </div>
                    </div>
                    <div className={style.xaingmmm}>
                        <div className={style.xaingtu}>
                            <img src={require("../../img/05.png").default} alt="标签" />
                        </div>
                        <div className={style.xmmianshu}>
                            <p>已售产品</p>
                            <h4>4589万</h4>
                            <h4>那是什么</h4>
                        </div>
                    </div>
                </div>
      

            </div >
        )
    }
}
